<div class="refentry" lang="en" xml:lang="en"><a id="gluBeginSurface"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>gluBeginSurface — delimit a NURBS surface definition</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">gluBeginSurface</b>(</code></td><td>GLUnurbs*  </td><td><var class="pdparam">nurb</var><code>)</code>;</td></tr></table></div></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">gluEndSurface</b>(</code></td><td>GLUnurbs*  </td><td><var class="pdparam">nurb</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>nurb</code></em></span></dt><dd><p>
                    Specifies the NURBS object (created with <a class="citerefentry" href="gluNewNurbsRenderer"><span class="citerefentry"><span class="refentrytitle">gluNewNurbsRenderer</span></span></a>).
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            Use <code class="function">gluBeginSurface</code> to mark the beginning of a NURBS
            surface definition. After
            calling <code class="function">gluBeginSurface</code>, make one or more calls to
            <a class="citerefentry" href="gluNurbsSurface"><span class="citerefentry"><span class="refentrytitle">gluNurbsSurface</span></span></a> to define the attributes of the surface.
            Exactly one of these calls to <a class="citerefentry" href="gluNurbsSurface"><span class="citerefentry"><span class="refentrytitle">gluNurbsSurface</span></span></a> must have a
            surface type of <code class="constant">GLU_MAP2_VERTEX_3</code> or <code class="constant">GLU_MAP2_VERTEX_4</code>.
            To mark the end of the NURBS surface definition, call
            <a class="citerefentry" href="gluEndSurface"><span class="citerefentry"><span class="refentrytitle">gluEndSurface</span></span></a>.
        </p><p>
            Trimming of NURBS surfaces is supported with <a class="citerefentry" href="gluBeginTrim"><span class="citerefentry"><span class="refentrytitle">gluBeginTrim</span></span></a>,
            <a class="citerefentry" href="gluPwlCurve"><span class="citerefentry"><span class="refentrytitle">gluPwlCurve</span></span></a>, <a class="citerefentry" href="gluNurbsCurve"><span class="citerefentry"><span class="refentrytitle">gluNurbsCurve</span></span></a>, and <a class="citerefentry" href="gluEndTrim"><span class="citerefentry"><span class="refentrytitle">gluEndTrim</span></span></a>. See the
            <a class="citerefentry" href="gluBeginTrim"><span class="citerefentry"><span class="refentrytitle">gluBeginTrim</span></span></a> reference page for details.
        </p><p>
            GL evaluators are used to render the NURBS surface as a set of polygons.
            Evaluator state is preserved during rendering
            with <a class="citerefentry" href="glPushAttrib"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>(<code class="constant">GLU_EVAL_BIT</code>) and
            <a class="citerefentry" href="glPopAttrib"><span class="citerefentry"><span class="refentrytitle">glPopAttrib</span></span></a>.
            See the <a class="citerefentry" href="glPushAttrib"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a> reference page for details on exactly what state
            these calls preserve.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="example"></a><h2>Example</h2><p>
            The following commands render a textured NURBS surface with normals;
            the texture coordinates and normals are also described as NURBS surfaces:
            </p><pre class="programlisting">
gluBeginSurface(nobj);
   gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
   gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
   gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);
            </pre><p>
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="gluBeginCurve"><span class="citerefentry"><span class="refentrytitle">gluBeginCurve</span></span></a>,
            <a class="citerefentry" href="gluBeginTrim"><span class="citerefentry"><span class="refentrytitle">gluBeginTrim</span></span></a>,
            <a class="citerefentry" href="gluNewNurbsRenderer"><span class="citerefentry"><span class="refentrytitle">gluNewNurbsRenderer</span></span></a>,
            <a class="citerefentry" href="gluNurbsCurve"><span class="citerefentry"><span class="refentrytitle">gluNurbsCurve</span></span></a>,
            <a class="citerefentry" href="gluNurbsSurface"><span class="citerefentry"><span class="refentrytitle">gluNurbsSurface</span></span></a>,
            <a class="citerefentry" href="gluPwlCurve"><span class="citerefentry"><span class="refentrytitle">gluPwlCurve</span></span></a>,
            <a class="citerefentry" href="glPushAttrib"><span class="citerefentry"><span class="refentrytitle">glPushAttrib</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
